home *** CD-ROM | disk | FTP | other *** search
/ AOL File Library: 4,101 to 4,200 / aol-file-protocol-4400-4101-to-4200.zip / AOLDLs / ADV - Articles & Misc / Manual for ProDev DDT8_DDT16 / DDT.MANUAL.bxy / DDT.Manual / CHAPTER.5 (.txt) < prev    next >
AppleWorks Document  |  1993-08-05  |  18KB  |  349 lines

  1. O=====<====<====<====<====<====<====<====<====<====<====<====<====<====<====<===
  2. O=====<====<====<====<====<====<====<====<====<====<====<====<====<====<====<===
  3. part of the normal register display.llowing the "E" re
  4. CHAPTER 5
  5. DISPLAYING AND MODIFYING
  6. DR - DISPLAY REGISTERS
  7. Display registers produces the following displays:
  8. {DDT8}D
  9. A=00 X=00 Y=00 S=E0 M=0B L=0 P=--1B----
  10.     { contents may vary } 
  11. 00/FF69:20 E0 FE    JSR FEE0
  12. {DDT16}D
  13. A=0000 X=0000 Y=0000 S=01E0 D=0000 B=00
  14.     { contents may vary }'
  15. M=09 Q=FF P=30=--MX---- L=0 E=0 I=0
  16. 00/0800:EA          NOP
  17. AThe various registers are represented by single letters with the G
  18. exception of the program counter which is represented in number form.
  19. The letters and their corresponding registers are as follows:
  20.                       A = Accumulator#
  21.                       X = X index#
  22.                       Y = Y index)
  23.                       S = Stack pointer;
  24.                       M = Machine state (pseudo register)A
  25.                       L = Language card state (pseudo register),
  26.                       P = Processor status
  27.                       {DDT16}'
  28.                       D = Direct page%
  29.                       B = Data Bank+
  30.                       Q = Quagmire state <
  31.                       E = Emulation (1 = 6502, 0 = Native)?
  32.                       I = Interrupt (1 = Interrupts disabled)
  33. The status bits are also represented by single letters as follows:
  34.                       N = Negative flag)
  35.                       V = oVerflow flag;
  36.                       1 = expansion flag (always one) {8},
  37.                       M = Memory size {16}2
  38.                       B = Break command flag {8}0
  39.                       X = indeX reg. size {16}-
  40.                       D = Decimal mode flag3
  41.                       I = Interrupt disabled flag,
  42.                       Z = Zero result flag&
  43.                       C = Carry flag5
  44.                       - = flag not set (flag clear)
  45.      "M=0B" shows the condition of the M pseudo register.<
  46.      "L=0" gives the condition of the language card where:<
  47.         0 = ROM selected, 1 = RAM bank #1, 2 = RAM bank #2
  48. {DDT8}K
  49. IThe bank number (00 or 01) is calculated for the current program counter I
  50. Glocation according to the settings of the various memory configuration I
  51. Gswitches. The bank number is then displayed before the program counter I
  52. Gand followed by "/". In this example "00/FF69", the bank is 00 and the 
  53. program counter is $FF69.
  54. R=N - REGISTER = N
  55. IThe REGISTER = N command allows you to enter a HEX value into any of the I
  56. Gprocessor's registers. "REG=" indicates the letter(s) representing any K
  57. Iof the valid registers followed by an "=" equal. The program counter is  J
  58. Hsignified by "PC", all of the other registers are signified by the same D
  59. Bletters described above in the DISPLAY REGISTERS command with the G
  60. Eexceptions; M, Q and L registers are pseudo registers and may not be 
  61. directly modified.
  62. EXAMPLE
  63. :A= $34
  64. :A=34
  65.  {Change the value of the accumulator to $34}
  66. GNote!  The dollar sign is optional and also note the spaces before the F
  67. Dnumber are ignored. In both cases the value $34 is entered into the G
  68. Eaccumulator. To verify this simply use the DR command to display the 
  69. registers.
  70. FThe processor status flags may also be individually set or cleared by I
  71. Gentering "P=" followed by a "Return" and then entering a "1" or a  "0" 
  72. for individual flags.
  73. EXAMPLE
  74. FLAGS  NV1BDIZC
  75. STATUS 00110000(
  76. ENTER        1
  77.       {Set the Z flag}
  78. {DDT16}
  79. :I= 1 - I Flag
  80. HOn a ][GS interrupts are used extensively. If you are tracing code with L
  81. Jthe DDT16 and an interrupt occurs the normal flow of the computer program K
  82. Itakes you to the interrupt handler routine. This can be very frustrating L
  83. Jif you are not interested in tracing the interrupt routine. To get around K
  84. Ithis problem a pseudo register has been added, the "I" register. The "I" K
  85. Iregister is used to prevent outside interrupts from being serviced while 
  86. tracing code.
  87. GEnter the command "I=1" to prevent servicing interrupts while TRacing, H
  88. FSTepping or EXecuting code. Enter "I=0" to clear the "I" register. Be I
  89. Gsure to set the "I" flag in the Status register to the proper state to F
  90. Denable interrupt servicing. Please note that while the "I" register J
  91. equals 1, the "I" flag in the status register will always get set to 1. 
  92. IAlso, please note that while tracing with the "I" register set to 1, any G
  93. Ecommands that affect the "I" flag will essentially be ignored. It is K
  94. Itherefore up to the user to determine the proper setting of the "I" flag 7
  95. in the status register after using the "I=1" command.
  96. The "I" register will not function properly if an accelerator is enabled.
  97. Li  [A] - LIST
  98. HThe LIST command causes 20 lines of code to be displayed to the current J
  99. Houtput device, starting at the address specified by "[A]". Omitting the G
  100. Eoptional address will cause the listing to start at the last address 
  101. accessed by the ProDev DDT.
  102. EXAMPLE
  103. :LI 0/E000  or  L 0/E000
  104.          {Note! If the "I" is omittedA
  105.                                    then at least one space must6
  106. 00/E000:RC 28 F1    JMP F128
  107.        follow the "L".
  108. 00/E003:4C 3C D4    JMP D43C
  109. "   "   "            "
  110. "   "   "            "
  111. "   "   "            "A
  112. 00/E02A:A5 14       LDA 14
  113.        {"L <cr>" will continue list;
  114.                                    from next instruction.
  115. MD [A] - MEMORY DUMP
  116. IThe MEMORY DUMP command displays 256 bytes of HEX data with 16 bytes per I
  117. Grow. Each HEX byte's corresponding ASCII character is displayed at the K
  118. Iend of each row. Omitting the optional address will cause the display to K
  119. Istart at the last address accessed by the ProDev DDT. Control characters 
  120. are displayed as a period.
  121. EXAMPLE
  122. :MD 0/D0D0
  123. 00/D0D0: 45 4E C4 45 4F D2 4E 45 58 D4 44 41 54 C1 49 4E  ENDFORNEXTDATAINM
  124. 00/D0E0: 50 55 D4 44 45 CC 44 49 CD 52 45 41 C4 47 D2 54  PUTDELDIMREADGRTE
  125. "   "    "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "          "F
  126. "   "    "  "  "  "  "  "  "  "  "  "  "  "  "  "  "  "          "
  127.  etc.    
  128. MM [A] - MEMORY MODIFY
  129. EThe MEMORY MODIFY command allows you to enter HEX data directly into H
  130. Fmemory. Data is input one byte (2 HEX digits) at a time. Pressing the K
  131. I"down arrow", or "Return" on a blank line, will display the next address J
  132. Hand data byte. Press the "up arrow" to display the previous address and J
  133. Hdata. If more than two digits are entered, the ProDev DDT will take the H
  134. Flast two digits entered. To exit the MEMORY MODIFY command, press the 
  135. "esc" key.
  136. EXAMPLE
  137. :MM 0/2000
  138. 00/2000 00 11
  139. 00/2001 00 22
  140. 00/2002 00 33%
  141. 00/2003 00 "up arrow"
  142.     {Backup}
  143. 00/2002 33 56744
  144. 00/2003 00 "up arrow"9
  145. 00/2002 44 
  146.      {The last two digits entered were 44})
  147.                   {Press "esc" to exit}
  148. MA [A] - Mini-Assembler
  149. GThe Mini-Assembler allows you to enter assembly language code directly L
  150. Jfrom the ProDev DDT. This eliminates reloading your assembler, editing in H
  151. Fyour modifications, assembling and loading your program each time you J
  152. Hwish to make a simple modification or add small sections of code to try G
  153. Enew ideas. With the ProDev DDT's mini-assembler you can modify your  J
  154. Hprogram directly and as many times as needed to get the desired result. H
  155. FOnce the program is working properly it is only necessary to edit and H
  156. Fassemble your source program one time. This is a great time saver and 8
  157. should greatly increase your programming productivity.
  158. FThe ProDev DDT's mini-assembler is patterned after the mini-assembler L
  159. that was included in the old Apple II Monitor ROM, with some exceptions.  I
  160. GAll mnemonics are as specified by "The Western Design Center, Inc." in K
  161. Itheir W65C816 data sheet. The addressing modes for the 6502 instructions H
  162. Fare the same as those described for the Apple mini-assembler. The new E
  163. Caddressing  modes for the 65C02 and 65802/816 are described in the 
  164. W65C816 data sheet.
  165. GTwo assembler directives have been included to facilitate the entry of "
  166. Data and ProDOS calls. They are:
  167.     HEX - Allows direct entry of 2 digit hexadecimal numbers. F
  168. D    ADR - Allows direct entry of 4 digit hexadecimal addresses. The ;
  169. addresses are stored in low order / hi order byte format.
  170. EFollowing are the addressing modes as recognized by the ProDev DDT's 
  171. Mini-Assembler:
  172. STANDARD 6502 ADDRESS FORMATS
  173.                TYPE:                              FORMAT:
  174.                accumulator                        Mnemonic onlyA
  175.                implied                            Mnemonic only6
  176.                immediate                          #n5
  177.                direct                             d7
  178.                direct indexed                     d,X7
  179.                                                   d,Y5
  180.                program counter relative           r9
  181.                direct indexed indirect            (d,X)9
  182.                direct indirect indexed            (d),Y5
  183.                absolute                           a7
  184.                absolute indexed                   a,X7
  185.                                                   a,Y7
  186.                absolute indirect                  (a)
  187. 65C02 ADDRESSING FORMATS
  188.                TYPE:                              FORMAT:
  189.                direct indirect                    (d)9
  190.                absolute indexed indirect          (a,X)
  191. 65802/816 ADDRESSING FORMATS
  192.                TYPE:                              FORMAT:
  193.                program counter relative long      rl7
  194.                direct indirect long               [d]9
  195.                direct indirect long indexed       [d],Y6
  196.                absolute long                      al8
  197.                absolute long indexed              al,X7
  198.                stack relative                     d,S;
  199.                stack relative indirect indexed    (d,S),Y6
  200.                block move                         bb
  201.                Abbreviations:
  202.                     n    1 byte number0
  203.                     d    1 byte direct address1
  204.                     r    2 byte relative offset6
  205.                     rl   3 byte relative long offset2
  206.                     a    2 byte absolute address7
  207.                     al   3 byte absolute long address-
  208.                     b    1 byte bank number
  209. FAll input values are assumed to be HEX digits and as such a preceding H
  210. Fdollar sign, "$nn", is optional. If fewer than the required number of I
  211. digits are input for an address, the ProDev DDT will automatically add 
  212. Gleading zeros to fill the address; if more than the required number of :
  213. digits are entered, the last to be entered will be used.
  214. @The ProDev DDT makes no distinction between direct and absolute G
  215. Eaddressing modes. If you enter an instruction which could use either <
  216. direct or absolute addressing, direct will always be used.
  217. FInstructions with accumulator and implied addressing modes do not use 
  218. operands.
  219. IThe destination address for branch instructions is entered directly and  F
  220. Dthe relative offset is automatically calculated. If the destination E
  221. Caddress is out of branch range, the ProDev DDT will respond with a K
  222. I"beep", the message "ERR BRANCH OUT OF RANGE" and will reject the input. L
  223. JIf you input an instruction which the ProDev DDT does not recognize or if K
  224. Iyou attempt to modify an instruction which currently has a Real break at I
  225. Gthat address, the ProDev DDT will "beep"  and place a circumflex, "^", (
  226. under the general area of the problem.
  227. EMnemonics and addressing modes of the 65C02 or 65802/816 will not be K
  228. Iaccepted unless the proper mode has been selected. (See the "MO" command -
  229. for an explanation of how to change modes.)
  230. DWhen you enter the mini-assembler the prompt will be changed from a G
  231. Ecolon, ":", to an exclamation point, "!". The current instruction is -
  232. disassembled and displayed at each address.
  233. DNote! The program counter is not affected by the "MD", "MM" or "MA" J
  234. Hcommands. This means you can be tracing a program, stop, go modify data L
  235. Jin  memory and return to tracing without losing your last position or the $
  236. contents of any of your registers.
  237. EXAMPLE
  238. Input a short program. (This program will also be used in later examples)
  239. :MA 0/2000
  240. 00/2000:00        BRK
  241.       { the current instruction is BRK:
  242.                  
  243. !LDA #00
  244.   { enter the new instructionA
  245.         A9 00
  246.               { code generated by mini-assemblerB
  247. 00/2002:00        BRK
  248.       { the next instruction is displayed%
  249.                  
  250. !STA 6
  251.     { etc.
  252.         85 06
  253. 00/2004:00        BRK
  254.                  
  255. !LDA#30
  256.    { notice that spaces are optional
  257.         A9 30
  258. 00/2006:00        BRK
  259.                  
  260. !STA 7
  261.         85 07
  262. 00/2008:00        BRK
  263.                  
  264. !LDY #1
  265.         A0 01
  266. 00/200A:00        BRK
  267.                  
  268. !LDA (06),Y
  269.         B1 06
  270. 00/200C:00        BRK
  271.                  
  272.         AA
  273. 00/200D:00        BRK
  274.                  
  275. !STX 3002
  276.         8E 02 30
  277. 00/2010:00        BRK
  278.                  
  279.         E8
  280. 00/2011:00        BRK
  281.                  
  282. !BNE 200D
  283.         D0 FA
  284. 00/2013:00        BRK
  285.                  
  286.        { "esc" returns to command level
  287. MW - MEMORY WINDOW
  288. JCommand MW allows you to select the various memory locations that you are I
  289. Ginterested in monitoring in the memory window. When you enter "MW" the F
  290. Dcursor will be placed in the memory window on the first address. To I
  291. Gchange an address, use the Return key or Down arrow to move the cursor I
  292. Gover the desired address. Change the desired digits by using the right J
  293. Hand left arrows to position the cursor and simply enter the new digits. F
  294. DPress the "esc" key to exit the memory window. The contents of each 1
  295. memory location are displayed in Hex and ASCII.
  296. IIn Serial mode the MW command will not display anything on your terminal K
  297. Ibut will expect you to enter the addresses anyway. You would NOT want to C
  298. Ado that since you don't have the memory window displayed on your F
  299. Dterminal. Use the Memory Modify command to examine memory locations 
  300. instead.
  301. PW - PROTECTION WINDOW
  302. IThe protection window consists of six address ranges. Each address range L
  303. Jconsists of a type letter followed by a bank number followed by the first D
  304. address of the range, a period, and the last address in the range.
  305.      There are three types of ranges. They are:
  306. I     T - Trace range. A trace range allows specified sections of code to H
  307. Fbe executed in real-time. During tracing or executing, if the program I
  308. Gcounter is placed inside a T range by a JSR{8} or JSL{16} instruction, C
  309. Athe program will start real-time execution until the instruction K
  310. Ifollowing the JSR/JSL in memory is reached. This is very useful for time -
  311. critical sections of code such as disk I/O.
  312. D{DDT16} Note! The stack is treated as native. Failure will occur if G
  313. target code is emulation mode (8 bit) JSR & stack is at $101 or $100.
  314. I     P - Program only. If one or more program only ranges are specified, J
  315. the program counter must remain inside one of the P ranges at all times 
  316. Eduring tracing or executing. If the program counter ventures outside K
  317. Ithese ranges, execution will stop and the message "OUTSIDE RANGE LIMITS" L
  318. Jwill be displayed. Code that is running in real-time or is contained in a 
  319. Trace range is not affected.
  320. C     N - No access. This range is active ONLY when Tracing. If the H
  321. Feffective address of any instruction, or the current program counter, I
  322. Genters a No access address range, program execution will be halted and H
  323. Fthe message "NO ACCESS HALT" will be displayed. This is one case when =
  324. using the "OFF" command to speed up tracing may be desired.
  325. J     "Space" - cancel current range. Entering a space over the range type H
  326. Fwill cancel the effect of the current range. The address of the range :
  327. will not be affected and the range type may be restored.
  328. D     If you enter the command "PW" the cursor will be placed in the J
  329. Hprotection window. Use the "down" arrow or "Return" key to position the I
  330. Gcursor over the desired range. Enter the range type letter followed by F
  331. the address information. Leave the window by pressing the "esc" key.
  332. H     In serial I/O mode, the ranges will be displayed one at a time and I
  333. Gyou will be given an opportunity to enter new information or go to the 
  334. next range.
  335.      EXAMPLES
  336. G     
  337. T00/8000.8200
  338.   Begin real-time execution if the program counter 0
  339. enters the range of $8000 to $8200 in bank 00.
  340. I     
  341. P01/0800.4000
  342.   Stop execution if the program counter gets outside *
  343. the range from $800 to $4000 in bank 01.
  344. A     
  345. N00/0100.01FF
  346.   Stop tracing if the program counter or the E
  347. Ceffective address of any instruction enters the range from $100 to +
  348. $1FF in bank 00. Works only when tracing.
  349.